.root {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: var(--z-index-toolbar-closed);
  display: none;
  flex-direction: column;
  gap: var(--spacing-2, 8px);
  justify-content: center;
  min-height: 40px;
  overflow: hidden;
  background-color: var(--pane-background);
  border: 1px solid var(--global-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0px 4px 20px 0px var(--shadow-basic-shadow);
  transition:
    width 150ms ease,
    height 150ms ease; /* Smooth resizing animation */
}

@media screen and (max-width: 767px) {
  .root {
    display: block;
  }
}

.ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.positionRelative {
  position: relative; /* Ensures child elements can be absolutely positioned */
}

/* Resize animation for opening and closing */
.closed {
  width: 40px;
  height: 40px;
}

.open {
  z-index: var(--z-index-toolbar-opened);
  width: 157px;
  height: 245px;
}

.openShowModeMenu {
  z-index: var(--z-index-toolbar-opened);
  width: 157px;
  height: 178px;
}

/* Fade-in animation for elements when they become visible */
.hidden {
  visibility: hidden; /* Hide element from the viewport */
  pointer-events: none; /* Prevent interactions while hidden */
  opacity: 0; /* Start with zero opacity */
  transition: opacity 165ms ease; /* Smooth fade-in animation */
}

.content {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0; /* Initially hidden */
  transition: opacity 165ms ease; /* Smooth opacity transition */
  transition-delay: 150ms; /* Delay to sync with resize animation */
}

.content.active {
  visibility: visible; /* Ensure element is displayed */
  pointer-events: auto; /* Enable interactions */
  opacity: 1; /* Make content fully visible */
}

.overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-index-overlay);
  background: transparent;
}
